-- db命令
-- Author: Colocasia
-- Date: 2018-03-17

local dbdefine = require "common.db.dbdefine";

local dbstruct = {};


function dbstruct.create_cmd(tbname)
    assert(tbname, "db record must set tbname");
    local this = {}
    this.m_tbname = tbname;
    this.m_pk = nil;
    this.m_execmd = nil;
    this.m_exetype = dbdefine.ENUM_DBCMD_EXETYPE.SQL;
    this.m_columns = {};
    this.m_values = {};
    this.m_condition = {};
    return this;
end

function dbstruct.create_result(code, derr, dmsg)
    local this = {}
    this.m_code = code;
    this.m_derr = derr;
    this.m_dmsg = dmsg;
    return this;
end

return dbstruct;

